package com.tansun.easycare.rule.rulemange.dao;

import java.util.List;
import java.util.Map;

import com.tansun.easycare.rule.common.dao.RuleBaseDao;
import com.tansun.easycare.rule.common.model.BaseModel;
import com.tansun.easycare.rule.common.model.SelectModelVo;
import com.tansun.easycare.rule.rulemange.entity.RuleManage;
import com.tansun.easycare.rule.rulemange.model.RuleManageVO;

/**
 * 规则管理DAO接口
 *
 * @author lxs
 * @version 2017-02-23
 */

public interface RuleManageDao extends RuleBaseDao<RuleManage> {
    /**
     * 查询规则管理VO信息
     */
    List<RuleManageVO> findRuleManageVO(Map<String, Object> map);
    
    /**
     * 查询页面显示主要组件的RuleManage
     * @param queryManage
     * @return
     */
    List<RuleManage> findMainManageList(RuleManage queryManage);
    
    /**
     * 根据查询条件查找对应的规则模型
     */
    List<RuleManageVO> findRuleManageByCondition(BaseModel condition);

    /**
     * 查询规则管理VO信息
     */
    List<RuleManageVO> findRuleManageVO(RuleManageVO ruleManage);

    /**
     * 查找选择规则管理信息
     */
    List<SelectModelVo> findSelectModelList(Map<String, Object> map);

	void updateActiveVersion(RuleManage ruleManage);

	List<SelectModelVo> findSelectModelFunctionParamList(Map<String, Object> map);

	void updateRuleModelAuthority(RuleManage ruleManage);
    /**
     * 根据本身模型manage查询关联模型的manage
     * @param ruleManage
     * @return
     */
    List<RuleManage> findListByRefManage(RuleManage ruleManage);
    /**
     * 根据id查询
     * @param ids
     * @return
     */
    List<RuleManage> findListByIds(Map<String, Object> map);

	/**
     * 更新关联层级ID（初始化）
     * @param condition
     * @return
     */
    int updateRankId(RuleManage condition);
    /**
     * 根据条件获取数据量
     * @param condition
     * @return
     */
    int countList(RuleManage condition);

    /**
     * 根据条件获取数据量
     * @param condition
     * @return
     */
    int countListFindName(RuleManage condition);
}